Skip to content

feat: upgrade to Solver 2.0#109

Merged
triceo merged 12 commits into
mainfrom
feat/fix-tsp
Feb 25, 2026
Merged

feat: upgrade to Solver 2.0#109
triceo merged 12 commits into
mainfrom
feat/fix-tsp

Conversation

@zepfred

@zepfred zepfred commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@zepfred zepfred marked this pull request as ready for review February 24, 2026 16:48
@zepfred zepfred requested a review from Copilot February 24, 2026 16:48
@zepfred zepfred marked this pull request as draft February 24, 2026 16:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the Timefold Solver benchmarks to Solver 2.0, which introduces several breaking API changes and improvements.

Changes:

  • Migrated score types from Long variants (HardSoftLongScore, SimpleLongScore, BendableLongScore) to integer variants (HardSoftScore, SimpleScore, BendableScore)
  • Refactored TSP domain model from chained variables to list variables with a Tour planning entity
  • Updated planning entity/variable annotations from deprecated attributes (difficultyWeightFactoryClass, strengthWeightFactoryClass) to new comparatorFactoryClass/comparatorClass
  • Migrated Jackson databind classes from com.fasterxml..jackson to tools.jackson package
  • Updated constraint provider methods from penalizeLong to penalize
  • Modernized PhaseCommand API to use PhaseCommandContext with metamodel and Moves API
  • Updated solver configuration XML with new sorterManner values (DESCENDING/ASCENDING instead of DECREASING_DIFFICULTY/INCREASING_STRENGTH)

Reviewed changes

Copilot reviewed 108 out of 110 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Multiple test files (*SmokeTest.java) Updated score type imports and test data from Long variants to integer variants
TSP domain classes (Visit.java, Tour.java, TspSolution.java, Domicile.java, Standstill.java) Refactored from chained variable model to list variable model with Tour entity
Score calculators and constraint providers Updated method calls from penalizeLong to penalize, changed score types
Domain solver classes (*ComparatorFactory.java) Replaced weight factory classes with comparator factory classes per new API
Jackson persistence classes Migrated from com.fasterxml.to tools.jackson package
PhaseCommand implementations Updated to use new PhaseCommandContext API with metamodel
Configuration XML files Updated sorterManner enums and added Tour entity class
Data files (europe40.json) Updated TSP data format for list variable model
pom.xml Removed explicit Jackson dependencies (now transitive)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zepfred zepfred requested a review from triceo February 24, 2026 19:46

@triceo triceo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM assuming that the TSPLIB scores are 100 % identical to before.

@zepfred zepfred marked this pull request as ready for review February 25, 2026 13:50
@triceo triceo merged commit 104bbe4 into main Feb 25, 2026
10 checks passed
@triceo triceo deleted the feat/fix-tsp branch February 25, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants